package com.yinp.proapp.module.wanandroid.bean;

import java.util.List;

/**
 * @author :yinpeng
 * date      :2022/1/12
 * package   :com.yinp.proapp.module.wanandroid.bean
 * describe  :
 */
public class WanQuestionAnswerBean {
    /**
     * curPage : 0
     * datas : [{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>Gson大家一定不陌生，在很多项目中都大规模使用。<\/p>\r\n<p>例如常见的：<\/p>\r\n<pre><code>网络请求\r\n    -&gt;返回Json数据\r\n    -&gt;Gson解析为对象\r\n    -&gt;渲染页面\r\n<\/code><\/pre><p>很多时候，历史项目包含很多Gson解析对象在UI线程的操作，或者说即使在子线程其实也会影响页面展现速度。<\/p>\r\n<p>大家都了解Gson对于对象的解析，如果不单独的配置TypeAdapter，那么其实内部是充满反射的。<\/p>\r\n<p>问题来了：<\/p>\r\n<p><strong>有没有什么低侵入的方案可以尽可能去除反射操作，从而提升运行效率？描述思路即可。<\/strong><\/p>","descMd":"","envelopePic":"","fresh":false,"host":"","id":19623,"link":"https://wanandroid.com/wenda/show/19623","niceDate":"2021-12-02 00:50","niceShareDate":"2021-08-30 21:36","origin":"","prefix":"","projectLink":"","publishTime":1638377423000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1630330596000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | Gson中序列化对象的操作有低侵入的优化方案吗？","type":0,"userId":2,"visible":1,"zan":9},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>今天意外在崩溃上报平台发现一个异常为UndeclaredThrowableException，看名字就比较好奇，大家可以搜索下，尝试回答：<\/p>\r\n<ol>\r\n<li>什么时候会抛出此异常？<\/li>\r\n<li>为什么[1]中重新封装为此异常抛出，这么设计的原因是？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":20514,"link":"https://www.wanandroid.com/wenda/show/20514","niceDate":"2021-12-02 00:50","niceShareDate":"2021-11-17 00:56","origin":"","prefix":"","projectLink":"","publishTime":1638377410000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1637081819000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 UndeclaredThrowableException 是什么异常？","type":0,"userId":2,"visible":1,"zan":2},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>问题如题：<\/p>\r\n<p>ViewGroup 的 measureChild 方法和 measureChildWithMargins 方法的区别是什么，如何在实际开发中决定选择使用哪一个？<\/p>\r\n<p>来源：<a href=\"https://wanandroid.com/wenda/show/8857?fid=833&amp;date=2021_10_12_09_13_15&amp;message=ViewGroup#msg_id2204\">可以从这里提问<\/a>，欢迎大家踊跃提问~<\/p>","descMd":"","envelopePic":"","fresh":false,"host":"","id":20130,"link":"https://wanandroid.com/wenda/show/20130","niceDate":"2021-12-02 00:50","niceShareDate":"2021-10-12 20:20","origin":"","prefix":"","projectLink":"","publishTime":1638377400000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1634041255000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"【大家提问】 | ViewGroup 的 measureChild 方法和 measureChildWithMargins 方法的区别是什么？","type":0,"userId":2,"visible":1,"zan":8},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>关于 Activity 重建，我们探究几个问题：<\/p>\r\n<ol>\r\n<li>当前 app 正在前台运行，不在栈顶的 Activity 有可能会因为系统资源，例如内存等不足回收吗？<\/li>\r\n<li>当 app 处于后台运行，app 进程未被杀死，其内部的 Activity 会被回收吗？<\/li>\r\n<li>当 app 处于后台运行，app 的进程会被杀死吗？<\/li>\r\n<\/ol>\r\n<p>如果有能力，建议解释过程中可以配合源码，不一定要全部答出来~<\/p>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18965,"link":"https://www.wanandroid.com/wenda/show/18965","niceDate":"2021-08-30 21:37","niceShareDate":"2021-07-15 00:27","origin":"","prefix":"","projectLink":"","publishTime":1630330636000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1626280047000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 关于 Activity 重建，值得探究的几个问题","type":0,"userId":2,"visible":1,"zan":19},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>了解应用启动相关代码的同学一定知道：<\/p>\r\n<p>我们的应用启动时，每个进程会对应一个ActivityThread对象，而Application对象在正常情况下也是每个进程只有一个？<\/p>\r\n<p>但是如果你看ActivityThread的源码，你会发现：<\/p>\r\n<pre><code>public final class ActivityThread {\r\n    final ArrayList&lt;Application&gt; mAllApplications\r\n                = new ArrayList&lt;Application&gt;();\r\n    ...\r\n}\r\n<\/code><\/pre><p><a href=\"https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/app/ActivityThread.java;l=237?q=ActivitYtHREAD&amp;sq=&amp;ss=android%2Fplatform%2Fsuperproject\">源码直达<\/a><\/p>\r\n<p>问题来了：<\/p>\r\n<ol>\r\n<li>什么情况下一个ActivityThread对象，会对应多个Application对象，即mAllApplications.size() &gt; 1；<\/li>\r\n<li>如果找到了1的情况，支持这个目的是？<\/li>\r\n<\/ol>\r\n<blockquote>\r\n<p>本问题归因为好奇，硬说使用场景在一些插件化中会尝试构造Application会调用这个，但是这个肯定不是google的本意。<\/p>\r\n<\/blockquote>","descMd":"","envelopePic":"","fresh":false,"host":"","id":19550,"link":"https://wanandroid.com/wenda/show/19550","niceDate":"2021-08-30 21:36","niceShareDate":"2021-08-25 18:10","origin":"","prefix":"","projectLink":"","publishTime":1630330617000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1629886237000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 好奇ActivityThread中为什么会有一个 Application的集合？","type":0,"userId":2,"visible":1,"zan":6},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>今天我们来讨论下 Jetpack 中的 ViewModel:<\/p>\r\n<p>大家都知道 ViewModel 有一个特点就是能够在 Activity 发生重建时做数据的恢复。<\/p>\r\n<p>我们就针对这个「重建」与「恢复」问一些问题：<\/p>\r\n<ol>\r\n<li>ViewModel 在 Activity 发生旋转等配置发生变化所导致的重建，能恢复数据吗？<\/li>\r\n<li>如果 1 能，尝试从源码角度分析，数据存在哪？怎么存储的？怎么读取的？<\/li>\r\n<li>当 Activity 切换到后台，被系统杀死（进程存活），此时回到 Activity 导致的重建，ViewModel 的数据能恢复吗？为什么？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18930,"link":"https://www.wanandroid.com/wenda/show/18930","niceDate":"2021-08-25 18:11","niceShareDate":"2021-07-11 22:05","origin":"","prefix":"","projectLink":"","publishTime":1629886294000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1626012349000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | ViewModel 在什么情况下的「销毁重建」能够对数据进行无缝恢复？","type":0,"userId":2,"visible":1,"zan":27},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>在我们的印象里，如果构造一个 Dialog 传入一个非 Activiy 的 context，则可能会出现 bad token exception。<\/p>\r\n<p>今天我们就来彻底搞清楚这一块，问题来了：<\/p>\r\n<ol>\r\n<li>为什么传入一个非 Activity 的 context 会出现错误？<\/li>\r\n<li>传入的 context 一定要是 Activity 吗？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18281,"link":"https://www.wanandroid.com/wenda/show/18281","niceDate":"2021-07-11 22:06","niceShareDate":"2021-05-13 00:20","origin":"","prefix":"","projectLink":"","publishTime":1626012414000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1620836414000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | Dialog 的构造方法的 context 必须传入 Activity吗？","type":0,"userId":2,"visible":1,"zan":22},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>更近一直在补一些 C/C++的知识，导致 Android 相关知识看的少了，导致每日一问憋半天憋不出来。<\/p>\r\n<p>还好，我又更新了...<\/p>\r\n<p>之前公众号推文的时候，推送到混淆的时候，经常会说到「脱糖」，也有同学在留言区问什么是脱糖呀？<\/p>\r\n<p>今天的问题就是为了带大家彻底搞清楚什么是脱糖：<\/p>\r\n<ol>\r\n<li>脱糖产生的原因是什么？<\/li>\r\n<li>脱糖在 D8 产生后发生了什么变化？<\/li>\r\n<li>脱糖我们需要关注吗？在我们做什么事情的时候可能会影响到呢？<\/li>\r\n<\/ol>\r\n<p>求解答~<\/p>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18615,"link":"https://www.wanandroid.com/wenda/show/18615","niceDate":"2021-07-11 22:06","niceShareDate":"2021-06-14 22:56","origin":"","prefix":"","projectLink":"","publishTime":1626012397000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1623682607000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 我们经常说到的 Android 脱糖指的是什么？","type":0,"userId":2,"visible":1,"zan":12},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>更近聊到一种编译优化的方案，号称秒级别：<\/p>\r\n<ol>\r\n<li>每次拿到修改 java 文件，编译为 class；<\/li>\r\n<li>将 1 中的 class 转成 dex；<\/li>\r\n<li>push 到 sdcard，然后重启生效；<\/li>\r\n<\/ol>\r\n<p>问题来了：<\/p>\r\n<ol>\r\n<li>第一步中将特定的 Java 文件转成 class 如何操作？如何极快的操作？<\/li>\r\n<li>如果是 kotlin 文件呢？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18453,"link":"https://www.wanandroid.com/wenda/show/18453","niceDate":"2021-07-11 22:06","niceShareDate":"2021-05-28 00:28","origin":"","prefix":"","projectLink":"","publishTime":1626012386000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1622132918000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 极致的编译优化如何实现？ [更新]","type":0,"userId":2,"visible":1,"zan":12},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":true,"courseId":13,"desc":"<p>之前看文章，经常看到一些分析 Dialog、PopupWindow的文章，有些文章分析如下：<\/p>\r\n<p><strong>Dialog有自己独立的Window，而PopupWindow没有，所以PopupWindow可以称之为子窗口，而 Dialog不是。<\/strong><\/p>\r\n<p>问题来了：<\/p>\r\n<ol>\r\n<li>这种说法合理吗？<\/li>\r\n<li>在Android中，有没有子窗口的概念呢？如果有到底应该以什么为标准呢？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18192,"link":"https://wanandroid.com/wenda/show/18192","niceDate":"2021-05-28 00:29","niceShareDate":"2021-05-06 00:15","origin":"","prefix":"","projectLink":"","publishTime":1622132956000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1620231346000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | Android中的子窗口到底指的是什么？","type":0,"userId":2,"visible":1,"zan":15},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>对于 Intent 大家肯定都不陌生，今天我们聊一聊它的一个近亲：<strong>PendingIntent<\/strong><\/p>\r\n<p>官方对其描述为：<\/p>\r\n<p>A description of an Intent and target action to perform with it. <\/p>\r\n<p>那么问题来了：<\/p>\r\n<ol>\r\n<li>PendingIntent 仅仅是对 Intent 的一个封装吗？<\/li>\r\n<li>如果1 不是，那么为什么 PendingIntent与 Intent 有何不同，它的定位是什么样的呢？<\/li>\r\n<li>对于 2 的回答，如果从源码侧佐证？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":18072,"link":"https://www.wanandroid.com/wenda/show/18072","niceDate":"2021-05-28 00:29","niceShareDate":"2021-04-24 22:58","origin":"","prefix":"","projectLink":"","publishTime":1622132946000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1619276317000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 已经有了 Intent，那为啥还要 PendingIntent?","type":0,"userId":2,"visible":1,"zan":8},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>正常大家都清楚，当我们view发生一些必须要重新测量才能生效的属性的时候，我们会尝试触发view.requestLayout从而让整个view树发生重新测量与布局。<\/p>\r\n<p>今天的问题是:<\/p>\r\n<ol>\r\n<li>假设requestLayout的调用发生在灭屏/切home之后会立即触发吗？<\/li>\r\n<li>如果1不会立即触发，当我们回到应用，会自动重新触发一次requestLayout吗？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17956,"link":"https://wanandroid.com/wenda/show/17956","niceDate":"2021-05-06 00:16","niceShareDate":"2021-04-15 14:40","origin":"","prefix":"","projectLink":"","publishTime":1620231413000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1618468829000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | view.requestLayout如果在灭屏或者切home之后调用会怎么样？","type":0,"userId":2,"visible":1,"zan":16},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>这个问题很明确了，想必大家都能了解，我们经常在自定义 View 的时候，会发现 onMeasure 执行了多次？<\/p>\r\n<p>那么问题来了：<\/p>\r\n<p><strong>onMeasure 执行多次的原因有哪些呢？<\/strong><\/p>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17920,"link":"https://www.wanandroid.com/wenda/show/17920","niceDate":"2021-05-06 00:16","niceShareDate":"2021-04-13 00:30","origin":"","prefix":"","projectLink":"","publishTime":1620231402000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1618245050000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问  | onMeasure()多次执行原因？","type":0,"userId":2,"visible":1,"zan":11},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>大家应该都清楚app上内存是非常宝贵的资源，而Bitmap几乎是app里面占据内存更大的一个部分。<\/p>\r\n<p>不少同学也清楚，Bitmap占据的内存计算为：<\/p>\r\n<pre><code>宽 * 高 * 单个像素所需字节数\r\n<\/code><\/pre><p>今天有个很常规，但是你可能没有太关注的问题：<\/p>\r\n<ol>\r\n<li>Bitmap所占用的内存，是app的哪部分的内存？或者说app运行时可使用Java内存为512M，Bitmap占据的内存可以超过512M吗?<\/li>\r\n<li>问题1中所描述的，需要区分Android版本吗（5.0以下不考虑）？<\/li>\r\n<li>问题1，问题2如果都搞清楚，经常在一些blog看到这样的代码：设置fresco图片缓存空间为Java内存的白分比，例如1/4，合适吗？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17874,"link":"https://wanandroid.com/wenda/show/17874","niceDate":"2021-04-19 23:40","niceShareDate":"2021-04-07 14:57","origin":"","prefix":"","projectLink":"","publishTime":1618846801000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1617778650000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 听说你做过内存优化 之 Bitmap内存占用到底在哪？","type":0,"userId":2,"visible":0,"zan":4},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>很多时候我们在自定义 View 的需要做动画的时候，我们可以依赖属性动画的回调周期性修改 自定义的属性值，然后调用 invalidate 方法实现。<\/p>\r\n<p>不过我还见过一个比较野的路子，它在 onDraw 里面直接修改属性，然后调用 invalidate() 方法。<\/p>\r\n<p>运行起来好像也没问题。<\/p>\r\n<p>那么问题来了：<\/p>\r\n<ol>\r\n<li>在 onDraw 里面调用 修改绘制相关属性（例如画圆，修改半径） invalidate() ，这种与属性动画的回调调用 invalidate()源码分析有什么区别？<\/li>\r\n<li>在 onDraw 里面调用  invalidate() 会存在什么问题？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17629,"link":"https://www.wanandroid.com/wenda/show/17629","niceDate":"2021-04-13 00:31","niceShareDate":"2021-03-15 00:43","origin":"","prefix":"","projectLink":"","publishTime":1618245076000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1615740191000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | onDraw 里面调用 invalidate 做动画，有什么问题？","type":0,"userId":2,"visible":1,"zan":13},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>关于kotlin的可空与非可空：<\/p>\r\n<ol>\r\n<li>在写代码的时候感觉是两种类型，那么他们在字节码上是不同的类型吗？<\/li>\r\n<li>方法的调用分为a.b(),a?.b(),a!!.b()，他们有什么区别？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17800,"link":"https://wanandroid.com/wenda/show/17800","niceDate":"2021-04-08 00:25","niceShareDate":"2021-03-30 21:12","origin":"","prefix":"","projectLink":"","publishTime":1617812734000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1617109936000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | Kotlin 空 与 非空类型的一些疑问","type":0,"userId":2,"visible":1,"zan":4},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>记得mipmap刚出来的时候，出现过很多言论，XXX类型图片放mipmap更好。<\/p>\r\n<p>如今的观念基本停留在，仅将app icon放置到mipmap，其他的图片都放到drawable。<\/p>\r\n<p>那么我们想想：<\/p>\r\n<ol>\r\n<li>google 为啥要搞个mipmap，或者mipmap有什么特殊的能力？<\/li>\r\n<li>从源码上能做出相关分析吗？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17666,"link":"https://wanandroid.com/wenda/show/17666","niceDate":"2021-03-30 21:14","niceShareDate":"2021-03-17 21:12","origin":"","prefix":"","projectLink":"","publishTime":1617110047000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1615986729000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | mipmap vs drawable，傻傻分不清楚？","type":0,"userId":2,"visible":1,"zan":3},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>线程大概应该非常熟悉了，一般面试问得比较多的可能是线程池相关的一些原理。<\/p>\r\n<p>不过在一个更高阶的面试过程中，可能会问考察线程与内存之间的一些联系。<\/p>\r\n<p>大家有没有思考过，目前业内一些头部 app，例如微信，抖音等，他们在运行时大概有多少个线程存活?<\/p>\r\n<p>另外如果大家比较关注 OOM 的话，线程比较多可能会导致 OOM，当然线程多导致OOM的原因不止一种，先不深究，想考虑一个问题：每个线程会占据多少内存？<\/p>\r\n<p>总结下问题：<\/p>\r\n<ol>\r\n<li>如何查看一个 app 在运行时，大概有多少线程在运行？<\/li>\r\n<li>每个线程会占据多少内存空间？这个内存空间是固定大小的吗？还是一开始很少，随着你方法调用越来越多，而动态增加？<\/li>\r\n<li>如何拿到一个线程已经使用的栈空间？<\/li>\r\n<li>我们能够调整一个线程占据的内存大小吗？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17356,"link":"https://wanandroid.com/wenda/show/17356","niceDate":"2021-03-18 23:20","niceShareDate":"2021-02-21 20:14","origin":"","prefix":"","projectLink":"","publishTime":1616080802000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1613909666000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | Android 中线程与内存之间相关问题","type":0,"userId":2,"visible":1,"zan":6},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>Wall Clock Time 是一段代码在某个线程上实际执行的时间，但由于cpu是分时间片给线程的，同时一段代码可能由于IO，还是类似调用wait等线程调用方法，阻塞不执行了，此时cpu会分配给其它线程，但这段代码其实并没有执行完，可能等某个条件触发后，轮到这段代码在的线程分到cpu后，继续执行，而执行这段代码cpu真正的用时是Thread Time。<\/p>\r\n<p>了解这个概念后：<\/p>\r\n<ol>\r\n<li>在 Android中如何获取某个方法执行过程中的 Thread time , wall Time?<\/li>\r\n<li>了解了这两个时间之后，在我们做性能优化的时候有什么指导意义？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17564,"link":"https://www.wanandroid.com/wenda/show/17564","niceDate":"2021-03-15 00:43","niceShareDate":"2021-03-09 00:29","origin":"","prefix":"","projectLink":"","publishTime":1615740209000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1615220958000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 在做性能优化的时候，常常看到 Thread(Cpu) Time，Wall clock Time?","type":0,"userId":2,"visible":0,"zan":0},{"apkLink":"","audit":1,"author":"xiaoyang","canEdit":false,"chapterId":440,"chapterName":"官方","collect":false,"courseId":13,"desc":"<p>今天的问题比较细了，探索一个大家可能没关注过的 API，View中包含一个方法：<\/p>\r\n<ul>\r\n<li>hasOverlappingRendering() <\/li>\r\n<\/ul>\r\n<p>问题很直接：<\/p>\r\n<ol>\r\n<li>这个方法有什么用？<\/li>\r\n<li>在什么情况下我们会考虑复写这个方法？<\/li>\r\n<\/ol>","descMd":"","envelopePic":"","fresh":false,"host":"","id":17131,"link":"https://wanandroid.com/wenda/show/17131","niceDate":"2021-02-21 20:16","niceShareDate":"2021-01-31 17:09","origin":"","prefix":"","projectLink":"","publishTime":1613909777000,"realSuperChapterId":439,"selfVisible":0,"shareDate":1612084141000,"shareUser":"","superChapterId":440,"superChapterName":"问答","tags":[{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}],"title":"每日一问 | 今天还探索一个 View 的方法 hasOverlappingRendering()","type":0,"userId":2,"visible":0,"zan":9}]
     * offset : -20
     * over : false
     * pageCount : 8
     * size : 20
     * total : 146
     */

    private int curPage;
    private int offset;
    private boolean over;
    private int pageCount;
    private int size;
    private int total;
    private List<DatasBean> datas;

    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public boolean isOver() {
        return over;
    }

    public void setOver(boolean over) {
        this.over = over;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<DatasBean> getDatas() {
        return datas;
    }

    public void setDatas(List<DatasBean> datas) {
        this.datas = datas;
    }

    public static class DatasBean {
        /**
         * apkLink :
         * audit : 1
         * author : xiaoyang
         * canEdit : false
         * chapterId : 440
         * chapterName : 官方
         * collect : true
         * courseId : 13
         * desc : <p>Gson大家一定不陌生，在很多项目中都大规模使用。</p>
         * <p>例如常见的：</p>
         * <pre><code>网络请求
         * -&gt;返回Json数据
         * -&gt;Gson解析为对象
         * -&gt;渲染页面
         * </code></pre><p>很多时候，历史项目包含很多Gson解析对象在UI线程的操作，或者说即使在子线程其实也会影响页面展现速度。</p>
         * <p>大家都了解Gson对于对象的解析，如果不单独的配置TypeAdapter，那么其实内部是充满反射的。</p>
         * <p>问题来了：</p>
         * <p><strong>有没有什么低侵入的方案可以尽可能去除反射操作，从而提升运行效率？描述思路即可。</strong></p>
         * descMd :
         * envelopePic :
         * fresh : false
         * host :
         * id : 19623
         * link : https://wanandroid.com/wenda/show/19623
         * niceDate : 2021-12-02 00:50
         * niceShareDate : 2021-08-30 21:36
         * origin :
         * prefix :
         * projectLink :
         * publishTime : 1638377423000
         * realSuperChapterId : 439
         * selfVisible : 0
         * shareDate : 1630330596000
         * shareUser :
         * superChapterId : 440
         * superChapterName : 问答
         * tags : [{"name":"本站发布","url":"/article/list/0?cid=440"},{"name":"问答","url":"/wenda"}]
         * title : 每日一问 | Gson中序列化对象的操作有低侵入的优化方案吗？
         * type : 0
         * userId : 2
         * visible : 1
         * zan : 9
         */

        private String apkLink;
        private int audit;
        private String author;
        private boolean canEdit;
        private int chapterId;
        private String chapterName;
        private boolean collect;
        private int courseId;
        private String desc;
        private String descMd;
        private String envelopePic;
        private boolean fresh;
        private String host;
        private int id;
        private String link;
        private String niceDate;
        private String niceShareDate;
        private String origin;
        private String prefix;
        private String projectLink;
        private long publishTime;
        private int realSuperChapterId;
        private int selfVisible;
        private long shareDate;
        private String shareUser;
        private int superChapterId;
        private String superChapterName;
        private String title;
        private int type;
        private int userId;
        private int visible;
        private int zan;
        private List<TagsBean> tags;

        public String getApkLink() {
            return apkLink;
        }

        public void setApkLink(String apkLink) {
            this.apkLink = apkLink;
        }

        public int getAudit() {
            return audit;
        }

        public void setAudit(int audit) {
            this.audit = audit;
        }

        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        public boolean isCanEdit() {
            return canEdit;
        }

        public void setCanEdit(boolean canEdit) {
            this.canEdit = canEdit;
        }

        public int getChapterId() {
            return chapterId;
        }

        public void setChapterId(int chapterId) {
            this.chapterId = chapterId;
        }

        public String getChapterName() {
            return chapterName;
        }

        public void setChapterName(String chapterName) {
            this.chapterName = chapterName;
        }

        public boolean isCollect() {
            return collect;
        }

        public void setCollect(boolean collect) {
            this.collect = collect;
        }

        public int getCourseId() {
            return courseId;
        }

        public void setCourseId(int courseId) {
            this.courseId = courseId;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getDescMd() {
            return descMd;
        }

        public void setDescMd(String descMd) {
            this.descMd = descMd;
        }

        public String getEnvelopePic() {
            return envelopePic;
        }

        public void setEnvelopePic(String envelopePic) {
            this.envelopePic = envelopePic;
        }

        public boolean isFresh() {
            return fresh;
        }

        public void setFresh(boolean fresh) {
            this.fresh = fresh;
        }

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }

        public String getNiceDate() {
            return niceDate;
        }

        public void setNiceDate(String niceDate) {
            this.niceDate = niceDate;
        }

        public String getNiceShareDate() {
            return niceShareDate;
        }

        public void setNiceShareDate(String niceShareDate) {
            this.niceShareDate = niceShareDate;
        }

        public String getOrigin() {
            return origin;
        }

        public void setOrigin(String origin) {
            this.origin = origin;
        }

        public String getPrefix() {
            return prefix;
        }

        public void setPrefix(String prefix) {
            this.prefix = prefix;
        }

        public String getProjectLink() {
            return projectLink;
        }

        public void setProjectLink(String projectLink) {
            this.projectLink = projectLink;
        }

        public long getPublishTime() {
            return publishTime;
        }

        public void setPublishTime(long publishTime) {
            this.publishTime = publishTime;
        }

        public int getRealSuperChapterId() {
            return realSuperChapterId;
        }

        public void setRealSuperChapterId(int realSuperChapterId) {
            this.realSuperChapterId = realSuperChapterId;
        }

        public int getSelfVisible() {
            return selfVisible;
        }

        public void setSelfVisible(int selfVisible) {
            this.selfVisible = selfVisible;
        }

        public long getShareDate() {
            return shareDate;
        }

        public void setShareDate(long shareDate) {
            this.shareDate = shareDate;
        }

        public String getShareUser() {
            return shareUser;
        }

        public void setShareUser(String shareUser) {
            this.shareUser = shareUser;
        }

        public int getSuperChapterId() {
            return superChapterId;
        }

        public void setSuperChapterId(int superChapterId) {
            this.superChapterId = superChapterId;
        }

        public String getSuperChapterName() {
            return superChapterName;
        }

        public void setSuperChapterName(String superChapterName) {
            this.superChapterName = superChapterName;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public int getVisible() {
            return visible;
        }

        public void setVisible(int visible) {
            this.visible = visible;
        }

        public int getZan() {
            return zan;
        }

        public void setZan(int zan) {
            this.zan = zan;
        }

        public List<TagsBean> getTags() {
            return tags;
        }

        public void setTags(List<TagsBean> tags) {
            this.tags = tags;
        }

        public static class TagsBean {
            /**
             * name : 本站发布
             * url : /article/list/0?cid=440
             */

            private String name;
            private String url;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }
    }
}
